package cn.lyjuan.android.demofive.ui.translate;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.ActivityOptionsCompat;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import cn.lyjuan.android.demofive.R;

/**
 * Created by chad on 25/10/2017.
 */

public class StartActivity extends AppCompatActivity
{
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.ui_compat_custom_start);
    }

    public void translate(View view)
    {
        ActivityOptionsCompat compat = ActivityOptionsCompat.makeCustomAnimation(
                this, R.anim.ui_cut_animation_alpha_in, R.anim.ui_cut_animation_alpha_out);

        ActivityCompat.startActivity(this, new Intent(this, TargetActivity.class), compat.toBundle());
    }
}
